#!/usr/bin/ruby
# -*- ruby -*-
#
# http://www.reddit.com/r/dailyprogrammer/comments/11paok/10182012_challenge_104_easy_powerplant_simulation/

arr = (1 .. (ARGV.shift.to_i || 365)).to_a.delete_if do |d|
        [3, 14, 100].select { |o| (d % o) == 0 }.size > 0
end.to_a

puts arr.size
